package com.system.permissiondemo.dto;

import com.google.common.collect.Lists;
import com.system.permissiondemo.entity.SysDept;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;
/**
* @Description:    部门等级
* @Author:         Joe
* @CreateDate:     2020/3/27 15:45
*/
@Data
public class DeptLevelDTO extends SysDept {

    private List<DeptLevelDTO> dtoList = Lists.newArrayList();

    public static DeptLevelDTO adapt(SysDept dept){
        DeptLevelDTO dto = new DeptLevelDTO();
        //相同字段拷贝
        BeanUtils.copyProperties(dept,dto);
        return dto;
    }

}
